﻿using System;
using System.Windows;
using System.Windows.Media;
using Bookworm.Controls;

namespace Bookworm
{
    /// <summary>
    /// Interaction logic for BookwormAppWindow.xaml
    /// </summary>
    public partial class BookwormAppWindow
    {
        public bool IsPopUpOpen
        {
            get { return this.popUpMainMenu.IsOpen; }
        }


        public BookwormAppWindow()
        {
            InitializeComponent();
        }

        private void OnMainWindowLoaded(object sender,RoutedEventArgs e)
        {
            try
            {
                VistaGlassHelper.ExtendGlass(this, 0, 0, 0,(int)this.brActionButtons.ActualHeight+5);                         
            }
            catch (Exception)
            {
                // A DllNotFoundException occurs if you run this on Windows XP.
                // A NotSupportedException is thrown if the
                // DwmExtendFrameIntoClientArea() call fails.
                Background = Brushes.White;
            }
        }
        private void OnBtnMainMenuClick(object sender,RoutedEventArgs e)
        {

            this.popUpMainMenu.IsOpen = !this.IsPopUpOpen;
        }        

        
    }
}
